package server.command.ecs;

import java.util.ArrayList;

import app_kvServer.KVServer;
import app_kvServer.ServerMetadata;
import server.command.client.ClientInputHandler;
import server.command.client.ICommand;
import utils.IKeyValueStorage;
import utils.SynchronizedAccessStorageUtil;
import common.messages.KVMessage.StatusType;

public class CommandUpdateMeta implements ICommand {
	private KVServer server;
	private ArrayList<ServerMetadata> metadata;
	
	public CommandUpdateMeta(KVServer server, ArrayList<ServerMetadata> metadata) {
		this.server = server;
		this.metadata = metadata;
	}
	
	@Override
	public String execute() {
		server.updateMetadata(metadata);
		return ClientInputHandler.composeClientResponse(StatusType.METADATA_UPDATED, " ", ""); 
	}
}
